package cn.class2.demo5.main

import cn.class2.demo5.AbsParent

/**
  * Created by lzd on 2018/11/13.
  * 必须重写的快捷键ctrl+i
  * 选择性重写的快捷键ctrl+o
  */
class Demo2 extends AbsParent{
   def eat(): Unit = {
     println("demo2 eat end...")
   }

  override def sleep(): Unit = {
    super.sleep()
    println("demo sleep end")
  }
}

object Demo2{
  def main(args: Array[String]): Unit = {
    val d = new Demo2
    d.eat()
    d.sleep()
  }
}
